package com.cy.common.util;

import org.apache.shiro.SecurityUtils;

import com.cy.sys.pojo.SysUser;

public class ShiroUtil {
	
	public static SysUser getUser() {
		SysUser user = (SysUser)SecurityUtils.getSubject().getPrincipal();
		return user;
	}
	
	public static String getUserName() {
		return getUser().getUsername();
	}
}
